<template>
  <p v-html="html"></p>
</template>

<script>
export default {
  props: {
    text: String
  },

  computed: {
    html() {
      const textArray = this.text.split(/\r?\n/);
      const lines = [];

      textArray.forEach((line, array, index) => {
        lines.push(line);
      });

      return lines.join("<br/>");
    }
  }
};
</script>
